import axios from "../../axios.js"

export default {
    LoginApi(data) {
        return axios({
            url: '/crm/login',
            method: 'post',
            data,
        })
    },
    // 退出登录
    OutApi(data) {
        return axios({
            url: '/crm/quit',
            method: 'post',
            data,
        })
    },
    // 显示个人信息
    getUserInfoApi(data, binding) {
        return axios({
            url: '/crm/getPersonal',
            method: 'get',
            data,
            headers: {
                "binding": binding
            }
        })
    },
    // 修改个人信息
    EiditUserInfoApi(data) {
        return axios({
            url: '/user-entity/updateById',
            method: 'post',
            data
        })
    },
    //修改密码
    changePwdApi(data, binding) {
        return axios({
            url: '/crm/ResetPassword',
            method: 'post',
            data,
            headers: {
                "binding": binding
            }
        })
    },
    // 首页消息
    // 最新消息
    NewNewsApi(data, binding) {
        return axios({
            // url: '/crm/getNewNotice',
            url: '/info/list',
            method: 'post',
            data,
            headers: {
                "binding": binding
            }
        })
    },
    Change(data, binding) {
        return axios({
            url: '/info/update',
            method: 'post',
            data,
            headers: {
                "binding": binding
            }
        })
    },

    // 历史消息
    HistoryNewsApi(data, binding) {
        return axios({
            // url: '/crm/getNoticeByPape',
            url: '/info/list',
            method: 'post',
            data,
            headers: {
                "binding": binding
            }
        })
    },
    // 新消息条数
    CountNewsApi(data, binding) {
        return axios({
            url: '/crm/getNoticeCount',
            method: 'get',
            params: data,
            headers: {
                "binding": binding
            }
        })
    },
    // 用户踢出
    kinkOut(data, binding) {
        return axios({
            url: '/crm/kinkOut',
            method: 'post',
            data,
            headers: {
                "binding": binding
            }
        })
    },
    // 获取呼叫中心token
    getCallTokenApi(data, binding) {
        return axios({
            url: '/crm/web',
            method: 'post',
            data,
            headers: {
                "binding": binding
            }
        })
    },
    // 过滤
    blackFilterApi(data) {
        return axios({
            url: '/crm/webSock',
            method: 'post',
            data
        })
    },
    // 黑名单
    blacklistApi(data, binding) {
        return axios({
            url: '/crm/blacklist/selectPhone',
            method: 'get',
            params: data,
            headers: {
                "binding": binding
            }
        })
    },
    // 获取未关闭的数据来源
    getDataFromApi() {
        return axios({
            url: '/crm/dataSource/queryOpen',
            method: 'get'
        })
    },
    // 通话备注
    telMasket_Api(data) {
        return axios({
            url: '/crm/updateMyCallInfo',
            method: 'post',
            data
        })
    },
    // 通话统计
    telCounts_Api(data) {
        return axios({
            url: '/crm/selectMyCallInfo',
            method: 'post',
            data
        })
    },
    // 接线部数据来源
    dataFrom3(data) {
        return axios({
            url: '/crm/dataSource/queryOpenDtNetwork',
            method: 'get',
            params: data
        })
    },
    // 信息部分配人员数据（可分给中心总监，部门经理）
    choosePersonInfo(data) {
        return axios({
            url: '/crm/selectDepartmentByInformation',
            method: 'get',
            params: data
        })
    },
    // 获取后台部门人员,渠道专员
    getSelectBackUser_Api(data) {
        return axios({
            url: '/crm/selectBackUser',
            method: 'get',
            params: data
        })
    },
    // 获取做单渠道
    getSingleChannel_Api(data) {
        return axios({
            url: '/crm/selectAllChannel',
            method: 'get',
            params: data
        })
    },
    // 中心总监查询部门经理
    centerGetDepartUser_Api(data) {
        return axios({
            url: '/crm/selectDepartmentByInformationManager',
            method: 'get',
            params: data
        })
    },
    // 获取前后台所有部门
    getAllCR(data) {
        return axios({
            url: '/crm/selectCR',
            method: 'get',
            params: data
        })
    },
    // 获取接线部人员
    getTelDepartPerson_Api(data) {
        return axios({
            url: '/crm/selectAllTelephoneOperator',
            method: 'get',
            params: data
        })
    },
};
